<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body,
        html {
            height: 100%;
        }

        .top {
            height: 100px;
            background-color: red;
        }

        .bottom {
            height: 100px;
            background-color: yellow;
        }

        .center {
            display: flex;
            height: calc(100% - 200px);
        }

        .left,
        .right {
            width: 200px;
        }

        .left {
            background-color: green;
        }

        .right {
            background-color: blue;
        }

        .middle {
            flex: 1;
            background-color: black;
        }
    </style>
</head>

<body>
    <div class="top"></div>
    <div class="center">
        <div class="left"></div>
        <div class="middle"></div>
        <div class="right"></div>
    </div>
    <div class="bottom"></div>
</body>

</html>
<!-- <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .header,
        .footer {
            height: 40px;
            width: 100%;
            background: red;
        }

        .footer {
            /* footer 清除浮动 */
            clear: both;
        }

        .container {
            padding-left: 200px;
            padding-right: 250px;
        }

        .container div {
            position: relative;
            float: left;
        }

        .middle {
            width: 100%;
            background: yellow;
        }

        .left {
            width: 200px;
            background: pink;
            margin-left: -100%;
            left: -200px;
        }

        .right {
            width: 250px;
            background: blue;
            margin-left: -250px;
            left: 250px;
        }
    </style>
</head>

<body>
    <div class="header">这里是头部</div>
    <div class="container">
        <div class="middle">中间部分</div>
        <div class="left">左边</div>
        <div class="right">右边</div>
    </div>
    <div class="footer">这里是底部</div>
</body>

</html> -->